Index: vfs_syscalls.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/vfs_syscalls.c,v
retrieving revision 1.151.2.9
diff -u -r1.151.2.9 vfs_syscalls.c
--- sys/kern/vfs_syscalls.c	12 Aug 2001 10:48:00 -0000	1.151.2.9
+++ sys/kern/vfs_syscalls.c	16 Jan 2002 22:56:04 -0000
@@ -678,6 +678,8 @@
 	if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) != 0)
 		return (error);
 	mp = ((struct vnode *)fp->f_data)->v_mount;
+	if (mp == NULL)
+		return (EBADF);
 	sp = &mp->mnt_stat;
 	error = VFS_STATFS(mp, sp, p);
 	if (error)
